package com.hibase.common.constant;

/**
 * redis key 常量
 */
public interface RedisKeyConstant {

    /**
     * 前缀头
     */
    String CACHE_SECURE_KEY = "hibase:";

    /**
     * 用户缓存key
     */
    String CACHE_USER_KEY = CACHE_SECURE_KEY + "USER:";

    /**
     * 用户角色 缓存 key
     */
    String CACHE_USER_ROLE_KEY = CACHE_SECURE_KEY + "USER_ROLE";

    /**
     * 流水号锁
     */
    String SEQUENCE_LOCK_KEY = CACHE_SECURE_KEY + "LOCK_CODE_SEQUENCE";

    /**
     * 流水号前缀
     */
    String CODE_SEQUENCE_KEY = CACHE_SECURE_KEY + "CODE_SEQUENCE";

    /**
     * 序号当前值
     */
    String SEQUENCE_CUR_STEP_KEY = CACHE_SECURE_KEY + "SEQUENCE_CUR_STEP";

    /**
     * 流水号 替换字符
     */
    String SEQUENCE_REPLACE_STR = "0";

    /**
     * 流水号过期时间为1天
     */
    int CODE_SEQUENCE_EXPIRE = 60 * 60 * 24;

    /**
     * 消息队列前缀
     */
    String QUEUE_PREFIX_KEY = CACHE_SECURE_KEY + "QUEUE:";

    /**
     * 消息延迟队列前缀
     */
    String DELAY_QUEUE_PREFIX_KEY = CACHE_SECURE_KEY + "DELAY_QUEUE:";

    /**
     * 国际化 key
     */
    String CACHE_MESSAGE_SOURCE_KEY = CACHE_SECURE_KEY + "MESSAGE_SOURCE";

    /**
     * 用户菜单key
     */
    String CACHE_USER_XML_MENU_KEY = CACHE_USER_KEY + "XML_MENU:";
    /**
     * 用户仓库信息
     */
    String CACHE_USER_WAREHOUSE_KEY = CACHE_SECURE_KEY + "WAREHOUSE:";

    /**
     * API key
     */
    String CACHE_API_KEY = CACHE_SECURE_KEY + "API:";

    /**
     * API_PERMISSION key
     */
    String CACHE_API_PERMISSION_KEY = CACHE_SECURE_KEY + "API_PERMISSION:";

    String CACHE_API_IDEMPOTENCE_KEY = CACHE_SECURE_KEY + "API_IDEMPOTENCE:";

    /**
     * 防重复提交KEY
     */
    String NO_REPEAT_SUBMIT = CACHE_SECURE_KEY+ "NO_REPEAT_SUBMIT";

}
